<?php
class Staticblock_model extends Model
{
    function __construct()
    {
        parent::__construct();
        $this->load->database();
    }

    public function getStaticBlockList()
    {
        $this->db->select("*");
        $this->db->from('staticbock');
        $sql_res = $this->db->get();
        $res = $sql_res->result_array();
        return $res;
    }

   public function getGalleryList()
   {
       $this->db->select("*");
       $this->db->from('gallery_albums');
       $this->db->where(array('delete' => 0));
       $sql_res = $this->db->get();
       $res = $sql_res->result_array();
       return $res;
   }

    public function addNewStaticBlock($staticBlock)
    {
        $this->db->insert('staticbock',$staticBlock);
    }
    public function getGalleryById($galleryId)
    {
        $this->db->select("*");
        $this->db->from('gallery');
        $this->db->where(array('category_id' => $galleryId));
        $sql_res = $this->db->get();
        $res = $sql_res->result_array();
        return $res;
    }


}